The present invention relates to scheduling workshifts for employees based on work requirements. Scheduling is typically done in incremental time periods, such as 15-minute periods.
For example, a supermarket may need four baggers and five cashiers between 9:15 AM and 1:15 PM, and only two baggers and three cashiers from 1:15 PM until 5:30 PM, at which time the need may again be elevated. Of course, scheduling must be satisfied from the existing pool of employees. At the same time, many rules or constraints must also be satisfied. These rules include minimum and maximum hours for a given employee, rules related to employment of minors, rules relating to break times, rules dictated by union contracts, etc.
In the not-too-distant past, of course, scheduling was performed manually by a manager who sat down at a table with pencil, paper, or more recently with a spreadsheet or other simple computer program, and who filled in the schedule with the names of employees. After filling in the schedule, the manager might check that no rules have been broken.
While this method may still be performed in many small shops, it is wasteful of the manager""s time, and does not lead to efficient scheduling. In particular, such a method is highly impractical for a medium-to-large-scale operation comprising tens to thousands of employees.
More recently, computer methods have been developed to determine near-optimal schedules from the myriad of possible schedules. In particular, Gary M. Thompson, A Simulated-Annealing Heuristic For Shift Scheduling Using Non-Continuously Available Employees, Computers Ops. Res. Vol. 23, No.3, pp 275-288 (1996), incorporated herein by reference, describes a method of scheduling workshifts using a xe2x80x9csimulated annealingxe2x80x9d process which heuristically develops a trial schedule from an xe2x80x9cincumbentxe2x80x9d schedule, and compares the trial schedule both with the incumbent schedule and the best schedule found so far. Comparisons are made between values of an xe2x80x9cobjectivexe2x80x9d function, calculated for each schedule.
Generally, according to Thompson, a trial schedule which is xe2x80x9cbetterxe2x80x9d than the xe2x80x9cbestxe2x80x9d schedule determined thus far, replaces both the best and incumbent (or current) schedules, while a trial schedule which is better than just the incumbent replaces only the incumbent schedule. However, a trial schedule which is not better than the incumbent may still replace the incumbent, depending on a randomized annealing function. The advantage of simulated annealing is that it generates new solutions iteratively, exploring areas that other algorithms fail to examine.
Thompson""s objective function relies on several factors, in particular, cost, underscheduling and overscheduling. However, Thompson does not take into account employee preferences, such as preferred hours, preferred jobs, etc. Furthermore, Thompson assumes homogeneously-skilled employees.
It is an objective of the present invention to develop a cost-effective workforce schedule based on workforce requirements, using a simulated annealing function while considering all of the above factors including employee preferences and job skills. Jobs requiring different skills or activities can be listed in preferential order for each employee. While not essential, in most cases, this is based on the employee""s skill level. Furthermore, the schedule must comply with certain constraints such as hours rules, minor rules, break rules, etc.
The weights assigned to employee preferences can be based on any data maintained, for example, in a database. For example, weights could be based wholly or in part on seniority, residential distance from the employer, zip code, age, and so on.
Accordingly, a method of dynamically scheduling a workforce comprises obtaining workforce requirements, attributes and preferences, determining a workforce schedule based on the workforce requirements and attributes, determining a schedule value, or cost, based on workforce requirements and preferences, and iteratively modifying the workforce schedule, determining a schedule value based on workforce requirements and preferences for the modified workforce schedule, and comparing schedule values to determine a best workforce schedule.
Determining a workforce schedule includes determining shifts and assigning employees to the shifts.
Specific steps performed by a particular embodiment include determining workforce requirements for a given time period. Then, responsive to the workforce requirements, an initial workforce schedule is determined for the given time period by determining shifts and assigning employees to the shifts, designating the initial workforce schedule as a trial workforce schedule and a best workforce schedule, and determining a value associated with the best workforce schedule responsive to the best workforce schedule, the workforce requirements and employee preferences. Next, the trial workforce schedule is modified. A value associated with the trial workforce schedule is determined based on the trial workforce schedule, the workforce requirements and employee preferences. If the value associated with the trial workforce schedule indicates a better match to the workforce requirements than a value associated with the best workforce schedule, the trial workforce schedule is designated as the best workforce schedule. This process is repeated for a predetermined number of iterations, after which the best workforce schedule is selected.
The value associated with the trial workforce schedule is further responsive to overscheduling and underscheduling of employees in each period. Furthermore, overscheduling, underscheduling and employee preferences can be weighted with respect to each other. In a particular embodiment, each job is associated with a weighting factor, which is applied where the associated job is scheduled. Similarly, in a particular embodiment, each period is associated with a weighting factor which is applied to the associated period.
In a particular embodiment, weights are set by a user.
Employee preferences can comprise, for example, preferred availability, preferred jobs, preferred days off, and/or a preferred total number of hours assigned for some duration, such as a week.
Furthermore, in a particular embodiment, employee preferences are weighted per employee. Such weighting can be, for example, according to seniority, or work status.
In a particular embodiment, the trial workforce schedule is modified by removing shifts, e.g., costly shifts, from the trial workforce schedule, adding shifts to the trial workforce schedule, and replacing shifts in the trial workforce schedule. Costly shifts are removed, in one embodiment, by repeatedly selecting a first predetermined number of most costly shifts and randomly removing one of the selected most costly shifts until some predetermined number of costly shifts have been removed.
The process of generating a schedule, e.g., adding shifts to a schedule, is aided in a particular embodiment by maintaining a scheduled employee list, a shift lookup table, and period totals.
Shifts can be added to the schedule by generating a list of candidate shifts that can be scheduled for a selected job, start time and stop time, and for each candidate shift. A most cost-reducing employee in a shift region who can fill the candidate shift is determined, and, if overall cost of adding this shift is less than costs corresponding to a predetermined number of lowest cost shifts thus far determined, added to a temporary list of lowest cost shifts. Finally, one of the candidate shifts in the temporary list is randomly selected, and added to the trial workforce schedule.
Shifts are replaced in a particular embodiment by initially stretching, shrinking or moving breaks around within a shift responsive to marginal cost data and marginal dissatisfaction costs. A replacement cost is calculated for every shift whose cost can be reduced. Finally, a lowest cost replacement is repeatedly determined, replacing the shift replaced with the replacement and the replacement cost of other shifts recalculated.
In a particular embodiment, the value of the objective function is a weighted sum of overscheduling and underscheduling over all periods and all jobs for a given duration, and employee dissatisfaction over all employees. Employee dissatisfaction is weighted responsive to any or all of, but is not limited to, seniority, work status, age, or commuting distance.
In particular, in at least one embodiment, employee dissatisfaction is a weighted sum of the number of hours that an employee spends working outside the employee""s preferred availability, the number of hours that the employee spends working outside the employee""s preferred jobs, the number of hours that the employee spends working on the employee""s preferred day off, and the difference between a number of scheduled hours and a number of preferred hours.